﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Practices.Unity;
using Microsoft.Practices.Unity.Configuration;
using Pigmalion.BusinessEntities;
using Pigmalion.DataAccess;

namespace Pigmalion.BusinessLogic
{
    public partial class CategoriaBL:ICategoriaBL
    {
        ICategoriaRepository CategoriaRepository;

        public CategoriaBL()
        {
            using (IUnityContainer container = new UnityContainer())
            {
                container.LoadConfiguration();

                CategoriaRepository = container.Resolve<ICategoriaRepository>();
            }
        }

        public List<Categoria> GetAllFromCategoria()
        {
            return CategoriaRepository.GetAllFromCategoria();
        }
    }
}
